From: Alexander Mikhaylenko Date: Sat, 13 Mar 2021 14:57:53 +0000 (+0500) Subject: swipeTracker: Reset before emitting 'end' and not after X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~616^2^2~127 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=f48e58a81a91ca6484c706d3405b219971984bbc;p=gnome-shell.git swipeTracker: Reset before emitting 'end' and not after If the actor is unmapped in the handler, the touch gesture will cancel. Since we haven't reset the state yet, it will still work and will actually cancel the gesture, so reset before that instead. Fixes overview cancelling when trying to open it with a swipe. Part-of: --- diff --git a/js/ui/swipeTracker.js b/js/ui/swipeTracker.js index 8f80bfb3e..9c3671d3c 100644 --- a/js/ui/swipeTracker.js +++ b/js/ui/swipeTracker.js @@ -741,8 +741,8 @@ var SwipeTracker = GObject.registerClass({ if (duration > 0) duration = Math.clamp(duration, MIN_ANIMATION_DURATION, maxDuration); - this.emit('end', duration, endProgress); this._reset(); + this.emit('end', duration, endProgress); } _cancelTouchGesture(_gesture, time, distance) {